﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace ChessOnline
{
    [DataContract]
    public class GameInfo
    {
        private string game_hash = "";

        [DataMember]
        public string Game_hash
        {
            get { return game_hash; }
            set { game_hash = value; }
        }
        
        private string creator_name = "";        

        [DataMember]
        public string Creator_name
        {
            get { return creator_name; }
            set { creator_name = value; }
        }
        
        private string connected_name = "";

        [DataMember]
        public string Connected_name
        {
            get { return connected_name; }
            set { connected_name = value; }
        }
        
        private string isStarted = "";

        [DataMember]
        public string IsStarted
        {
            get { return isStarted; }
            set { isStarted = value; }
        }
        
        private string winnerName = "";

        [DataMember]
        public string WinnerName
        {
            get { return winnerName; }
            set { winnerName = value; }
        }
        
        private string activePlayerHash = "";

        [DataMember]
        public string ActivePlayerHash
        {
            get { return activePlayerHash; }
            set { activePlayerHash = value; }
        }
        
        public GameInfo(string new_id, string new_creator_name, string new_connected_name)
        {
            Game_hash = new_id;
            Creator_name = new_creator_name;
            Connected_name = new_connected_name;
            IsStarted = "false";
            WinnerName = "";
            ActivePlayerHash = "";
        }
        
        public GameInfo()
        {
            Game_hash = "";
            Creator_name = "";
            Connected_name = "";
            IsStarted = "false";
            WinnerName = "";
            ActivePlayerHash = "";
        }
    }
}